#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	char ch;
	int num[26] = { 0 };

	while ((ch = getchar()) != '\n')
		if (ch >= 'A' && ch <= 'Z')
			num[ch - 'A']++;

	for (int i = 0; i < 26; i++)
	{
		printf("%c(%d)", 'A' + i, num[i]);
		if ((i + 1) % 5 == 0)
			printf("\n");
	}
	return 0;
}